#include "InputEvent.hpp"


InputEvent::InputEvent():
inputType(INVALID_INPUT_TYPE),
inputEventType(INVALID_EVENT_TYPE)
{
}
InputEvent::InputEvent(const INPUT_EVENT_TYPE iet,const sf::Key::Code key):
inputType(KEYBOARD_INPUT_TYPE),
inputEventType(iet),
keyCode(key)
{
	
}
	
InputEvent::InputEvent(const INPUT_EVENT_TYPE iet, const sf::Mouse::Button button):
inputType(MOUSE_INPUT_TYPE),
inputEventType(iet),
mouseButton(button)
{
}

bool InputEvent :: operator==(const InputEvent& e)
{	
	if(inputEventType == e.inputEventType && inputType == e.inputType)
	{
		if(inputType == KEYBOARD_INPUT_TYPE)
			return keyCode == e.keyCode;
		else if (inputType == MOUSE_INPUT_TYPE)
			return mouseButton == e.mouseButton;
	}
	
	return false;
}	
